#!/bin/bash
# Creates a .deb package for searx-qt
source ../libdeb.sh
PKGNAME="searx-qt-git"
VERSION=""
REL=1
ARCH="amd64"
MAINTAINER="CYBERDEViL <cyberdevil@notabug.org>"
DESC="Desktop client application for Searx/SearXNG/searx-space"
URL="https://notabug.org/cyberdevil/searx-qt"
MAKEDEPENDS=("python3-build" "python3-installer" "python3-wheel"
             "qtbase5-dev-tools" "gettext")
DEPENDS=("python3" "python3-requests" "python3-jsonschema" "python3-bs4"
         "python3-pyqt5")

get_sources() {
  cd "${SRCDIR}"
  git clone "https://notabug.org/cyberdevil/searx-qt" "${PKGNAME}"
}

prepare() {
  VERSION="$(git rev-list --count HEAD)"-"$(git rev-parse --short=7 HEAD)"
}

build() {
  cd "${SRCDIR}/${PKGNAME}"
  make all
}

package() {
  cd "${SRCDIR}/${PKGNAME}"
  make DESTDIR="${PKGDIR}/" PREFIX="usr/" install
}

exec
